 <!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/css/page.css" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
	<script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

   <script type="text/javascript">
        $(document).ready(function(){
			 $('.uploadfile').change(function(){
				 $(this).parent().find('.wangwang').attr('name','wangwang');
				 $(this).parent().find('.wangwang').val($(this).val());
				 $('#uploadform').submit();
			 }) 
		})
		function page(n,s){
			var starttime=$('#starttime').val();
			var endtime=$('#endtime').val();
			var name=$('#name').val();
			var asc=$('#asc').val();
			location.href='index?pageNo='+n+'&pageSize='+s+'&starttime='+starttime+'&endtime='+endtime+'&name='+name+'&asc='+asc;
	    	return false;
	    }
		
		function exportdata(){
			var starttime=$('#starttime').val();
			var endtime=$('#endtime').val();
			var pageNo=$('#pageNo').val();
			var pageSize=$('#pageSize').val();
			var name=$('#name').val();
			var asc=$('#asc').val();
			location.href='expenditure_export?pageNo='+pageNo+'&pageSize='+pageSize+'&starttime='+starttime+'&endtime='+endtime+'&name='+name+'&asc='+asc;
	    	return false;
	    }
		
		function dele(id)
		{
		    layer.confirm('确定要删除吗？',
			              {btn:['确定','取消']},
							  function(){
							      location.href="expenditure_delete/id/"+id
							  }
						  ),
						
						  function(){return false;} 
						  
		}
		
		function list_sort(name){
			if($('#asc').val()=='asc'){
				var asc='desc';
			}else{
				var asc='asc';
			}
			var title=$('#title').val();
			var phone=$('#phone').val();
			var orderno=$('#orderno').val();
			location.href='find?pageNo='+{$count.pageNo}+'&pageSize='+{$count.pageSize}+'&title='+title+'&phone='+phone+'&orderno='+orderno+'&name='+name+'&asc='+asc;
		}
	</script>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
         
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>支出列表</h5>
                        
                    </div>
                    <div class="ibox-content">
					<form id="searchForm" class="form-inline" method="post" action="{:U('index')}" >
					<div class="row">
                            <input type='hidden' name='pageNo' id='pageNo' value='1' />
                            <input type='hidden' name='pageSize' id='pageSize' value='10' />
                            <input type='hidden' id='name' name='name' value='{$order.name}' />
                            <input type='hidden' id='asc' name='asc' value='{$order.asc}' />
                            
                            <div class='search'> 
							   <input class="form-control input-sm" placeholder="开始时间" name='starttime' id='starttime' onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="{$data['starttime']}">
							
							   <input class="form-control input-sm" placeholder="结束时间" name='endtime' id='endtime' onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="{$data['endtime']}">
							    
                               <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
							   <a class="btn btn-white btn-sm " href="javascript:window.location.reload(true);" data-toggle="tooltip" data-placement="left"   title="刷新"> <i class="glyphicon glyphicon-repeat"></i> 刷新</a>  
							   
                               <button type="button" class="btn btn-sm btn-primary" onclick="exportdata()"> 导出</button>
                            </div>
                        </div>
					    </form>
						<form action='expenditure_upload' method='post' enctype="multipart/form-data" id='uploadform'>
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
								    <th><input class="i-checks check-all" type="checkbox" /></th>
                                    <th>id</th>
                                    <th class="sort-column name sort" onClick="list_sort('id')">时间　<i class="<?php echo ($order['name']=='id' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='id' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('username')">部门　<i class="<?php echo ($order['name']=='username' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='username' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('email')">用途　<i class="<?php echo ($order['name']=='email' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='email' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('phone')">流动资金　<i class="<?php echo ($order['name']=='phone' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='phone' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class="sort-column name sort" onClick="list_sort('id')">金额　<i class="<?php echo ($order['name']=='id' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='id' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('username')">合计　<i class="<?php echo ($order['name']=='username' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='username' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('email')">收款人　<i class="<?php echo ($order['name']=='email' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='email' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('phone')">经手人　<i class="<?php echo ($order['name']=='phone' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='phone' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
									<th class="sort-column name sort" onClick="list_sort('id')">支出项目　<i class="<?php echo ($order['name']=='id' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='id' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('username')">佣金价格　<i class="<?php echo ($order['name']=='username' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='username' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('email')">佣金单数　<i class="<?php echo ($order['name']=='email' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='email' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('phone')">放单旺旺　<i class="<?php echo ($order['name']=='phone' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='phone' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th class='sort' onClick="list_sort('phone')">付款状态　<i class="<?php echo ($order['name']=='phone' && $order['asc']=='desc')?'fa fa-sort-desc':'' ?>"></i><i class="<?php echo ($order['name']=='phone' && $order['asc']=='asc')?'fa fa-sort-asc':'' ?>"></i></th></th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
							<foreach name="expenditure_list" item="expenditure" >
                                <tr>
								    <td><input class="i-checks" type="checkbox" name="ids" value="2" /></td>
                                    <td>{$expenditure.id}</td>
                                    <td>{$expenditure.expenditure_time}</td>
                                    <td>{$expenditure.customer_group}</td>
                                    <td>{$expenditure.purpose}</td>
                                    <td>{$expenditure.floating_capital}</td>
                                    <td>{$expenditure.amount}</td>
                                    <td>{$expenditure.total}</td>
                                    <td>{$expenditure.payee}</td>
                                    <td>{$expenditure.username}</td>
                                    <td>{$expenditure.expenditure_desc}</td>
                                    <td>{$expenditure.unit_price}</td>
                                    <td>{$expenditure.num}</td>
                                    <td><span><if condition=" !empty($expenditure['wangwang']) "> <img src="__PUBLIC__/{$expenditure.wangwang}"></if></span><input type='hidden' name='' class='wangwang'><input type='hidden' name='id' class='id' value="{$expenditure.id}"><input type='file' style='width:100%;opacity:80' name='uploadfile' class='uploadfile'></td>
                                    <td></td>
									<td>
									<a class="btn btn-sm btn-primary" title="编辑" href="{:U('expenditure_info',array('id'=>$expenditure['id']))}">编辑</a>
                                   	<if condition=" $user_type eq 2 ">
									<a class="btn btn-sm btn-primary" title="删除"  onclick="dele({$expenditure.id})">删除</a>
                                    </if>
								  </td>
								  </tr>
							</foreach>
                            </tbody>
                        </table>
						 
						</form>
						
                        <!-- 分页代码 -->
                       <div class="fixed-table-pagination" style="display: block;">
                           <div class="pull-left pagination-detail">
                                <span class="pagination-info">显示第 1 到第 10 条记录，总共 {$count.count} 条记录</span>
                                <span class="page-list">每页显示 
                                    <span class="btn-group dropup">
                                        <button type="button" class="btn btn-default  btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                            <span class="page-size">{$count.pageSize}</span> <span class="caret"></span></button>
                                            <ul class="dropdown-menu" role="menu">
                                            <li class="<if condition=" $count.pageSize eq 10"> active </if>"><a href="javascript:page(1,10,'');">10</a></li>
                                            <li class="<if condition=" $count.pageSize eq 25"> active </if>"><a href="javascript:page(1,25,'');">25</a></li>
                                            <li class="<if condition=" $count.pageSize eq 50"> active </if>"><a href="javascript:page(1,50,'');">50</a></li>
                                            <li class="<if condition=" $count.pageSize eq 100"> active </if>"><a href="javascript:page(1,100,'');">100</a></li>
                                            </ul>
                                     </span> 条记录
                                </span>
                            </div>
                            <div class="pull-right pagination-roll">
                             <ul class="pagination pagination-outline">
                                <li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page(1,{$count.pageSize},'');"><i class="fa fa-angle-double-left"></i></a></li>
                                <li class="paginate_button <if condition=" $count.pageNo eq 1"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}-1,{$count.pageSize},'');"><i class="fa fa-angle-left"></i></a></li>
                                 <if condition=" $count.countpage gt 10 "> 
                                    <if condition=" $count.pageNo lt 5 "> 
                                        <li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==1)?'current':'' ?>">1</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(2,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==2)?'current':'' ?>">2</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(3,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==3)?'current':'' ?>">3</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(4,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==4)?'current':'' ?>">4</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(5,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==5)?'current':'' ?>">5</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(6,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==6)?'current':'' ?>">6</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(7,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==7)?'current':'' ?>">7</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(8,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==8)?'current':'' ?>">8</a></li>
                                        <li class="paginate_button disabled"><a href="javascript:">...</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
                                    <elseif condition="$count.pageNo lt $count.num and $count.pageNo egt 5"/>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
                                        <li class="paginate_button disabled"><a href="javascript:">...</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-3; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-2; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']-1; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page({$count.pageNo},{$count.pageSize},'');" id='current'><?php echo $count['pageNo']; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+1; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+1; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+2; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+2; ?></a></li> 
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+3; ?>,{$count.pageSize},'');"><?php echo $count['pageNo']+3; ?></a></li>
                                        <li class="paginate_button disabled"><a href="javascript:">...</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');">{$count.countpage}</a></li>
                                    <else />
                                        <li class="paginate_button "><a href="javascript:" onClick="page(1,{$count.pageSize},'');">1</a></li>
                                        <li class="paginate_button disabled"><a href="javascript:">...</a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-4; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-4))?'current':'' ?>"><?php echo $count['countpage']-4; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-3; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-3))?'current':'' ?>"><?php echo $count['countpage']-3; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-2; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-2))?'current':'' ?>"><?php echo $count['countpage']-2; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-1; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($count['countpage']-1))?'current':'' ?>"><?php echo $count['countpage']-1; ?></a></li>
                                        <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']; ?>,{$count.pageSize},'');" id="<?php echo ($count['pageNo']==$count['countpage'])?'current':'' ?>"><?php echo $count['countpage']; ?></a></li>
                                    </if>
                                <else />
                                    <for start="0" end="$count.countpage" name='i'>
                                        <li class="paginate_button <if condition=" $count.pageNo eq $i+1"> previous disabled </if>"><a href="javascript:" onClick="page({$i+1},{$count.pageSize},'');" id="<?php echo ($count['pageNo']==($i+1))?'current':'' ?>">{$i+1}</a></li>
                                    </for>
                                </if>
                                <li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.pageNo}+1,{$count.pageSize},'');"><i class="fa fa-angle-right"></i></a></li>
                                <li class="paginate_button next <if condition=" $count.pageNo egt $count.countpage"> previous disabled </if>"><a href="javascript:" onClick="page({$count.countpage},{$count.pageSize},'');"><i class="fa fa-angle-double-right"></i></a></li>
                            </ul>
                          </div>
                    </div>
                    <br/><br/><br/>
                    
                         <div style='color:#1AB394;word-spacing:10px'>
                             <p>
                                 查询合计金额：{$statistics_total.amount}
                                 查询合计本金：{$statistics_total.floating_capital}
                                 查询合计单数：{$statistics_total.num}
                             </p>
                             <p>
                                 当前页合计金额：{$statistics.amount}
                                 当前页合计本金：{$statistics.floating_capital}
                                 当前页合计单数：{$statistics.num}
                             </p>
                             
                         </div>
                    </div>
                </div>
            </div>
             
        </div>
         
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/js/demo/peity-demo.min.js"></script>
	<script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
	 <if condition=" isset($res2)"> 
	 <if condition=" $res2 eq true "> 
		<script>layer.alert('删除成功');</script>
		<else />
		<script>layer.alert('删除失败');</script>
	</if>
	</if>
	 <if condition=" isset($res3)"> 
	 <if condition=" $res3 eq true "> 
		<script>layer.alert('新增成功');</script>
		<else />
		<script>layer.alert('新增失败');</script>
	</if>
	</if>
	 <if condition=" isset($res5)"> 
	 <if condition=" $res5 eq true "> 
		<script>layer.alert('修改成功');</script>
		<else />
		<script>layer.alert('修改失败');</script>
	</if>
	</if>
    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
		 $(document).ready(function () {
		
            $('.check-all').iCheck({
			 
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
		
	
	$(document).ready(function() {
    $('.check-all').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('check');
    	});

    $('.check-all').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('uncheck');
    	});
    
});
    </script>
    <div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>
<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>
</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
